<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="resource/css/bootstrap.css">
    <script type="text/javascript" src="resource/js/jquery-3.2.1.js"></script>
</head>
<body>
    <form action="list" method="post">
        <input type="hidden" name="pageNum">
        <table class="table">
            <tr>
                <td colspan="22">
                    <select name="person">
                        <option value="">===请选择===</option>
                        <option value="jie" ${vo.person=='jie'?'selected':''}>借方</option>
                        <option value="dai" ${vo.person=='dai'?'selected':''}>贷方</option>
                        <option value="money" ${vo.person=='money'?'selected':''}>余额</option>
                    </select>
                    <input type="text" name="person1" value="${vo.person1}">至
                    <input type="text" name="person2" value="${vo.person2}">
                    &nbsp;&nbsp;
                    <select name="num">
                        <option value="">===请选择===</option>
                        <option value="c1.id" ${vo.num=='c1.id'?'selected':''}>源账号</option>
                        <option value="c1.name" ${vo.num=='c1.name'?'selected':''}>源账号名称</option>
                        <option value="c2.id" ${vo.num=='c2.id'?'selected':''}>目标账号</option>
                        <option value="c2.name" ${vo.num=='c2.name'?'selected':''}>目标账号名称</option>
                        <option value="counts" ${vo.num=='counts'?'selected':''}>科目编号</option>
                        <option value="w.name" ${vo.num=='w.name'?'selected':''}>科目</option>
                    </select>
                    <input type="text" name="num1" value="${vo.num1}">
                    &nbsp;&nbsp;
                    摘要:<input type="text" name="other" value="${vo.other}">
                    &nbsp;&nbsp;
                    财务日期:<input type="date" name="date1" value="<fmt:formatDate value="${vo.date1}" pattern="yyyy-MM-dd"></fmt:formatDate>">至
                            <input type="date" name="date2" value="<fmt:formatDate value="${vo.date2}" pattern="yyyy-MM-dd"></fmt:formatDate>">
                    <input type="submit" value="查询"><br>
                    <a href="toAdd">添加</a>
                </td>
            </tr>
            <tr>
                <td>编号</td>
                <td>财务日期</td>
                <td>源账号</td>
                <td>源账号名称</td>
                <td>目标账号</td>
                <td>目标账号名称</td>
                <td>科目编号</td>
                <td>科目</td>
                <td>摘要</td>
                <td>借方</td>
                <td>贷方</td>
                <td>余额</td>
            </tr>
            <c:forEach var="water" items="${info.list}">
                <tr>
                    <td>${water.id}</td>
                    <td><fmt:formatDate value="${water.dates}" pattern="yyyy-MM-dd"></fmt:formatDate></td>
                    <td>${water.c1.id}</td>
                    <td>${water.c1.name}</td>
                    <td>${water.c2.id}</td>
                    <td>${water.c2.name}</td>
                    <td>${water.counts}</td>
                    <td>${water.name}</td>
                    <td>${water.other}</td>
                    <td>${water.jie}</td>
                    <td>${water.dai}</td>
                    <td>${water.money}</td>
                </tr>
            </c:forEach>
            <tr>
                <td colspan="22">
                    <jsp:include page="/resource/page/pages.jsp"></jsp:include>
                </td>
            </tr>
        </table>
    </form>

    <script type="text/javascript">
        function goPage(pageNum){
            $("[name='pageNum']").val(pageNum);
            $("form").submit();
        }
    </script>
</body>
</html>
